package pikasial.graphique;

import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextArea;

public class AProposDialog extends JDialog {

	private static final long serialVersionUID = -3069378158081037733L;

        public AProposDialog(JFrame parent) {
            super(parent, "A propos", false);
            
            String message = "Pikasial : application de gestion d'images."+
                    "\n\n Développée dans le cadre du projet JAVA 2A par :" +
                    "\n  - Benoit ROUSSEL (benoit.roussel@esial.uhp-nancy.fr)" +
                    "\n  - Nicolas LHUILLIER (nicolas.lhuillier@esial.uhp-nancy.fr)" +
                    "\n  - Landry COLLET (landry.collet@esial.uhp-nancy.fr)" +
                    "\n  - Vincent HUMBERT (vincent.humbert@esial.uhp-nancy.fr)\n";
            
            JPanel pane = new JPanel();
            
            JTextArea jl = new JTextArea(message);
            jl.setEditable(false);
            
            JButton ok = new JButton("OK");
            ok.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent arg0) {
                    AProposDialog.this.dispose();
                }
            });
            
            pane.add(jl);
            pane.add(ok);
            
            setContentPane(pane);
            pack();
        }
        
        public void afficher() {
            setVisible(true);
        }
}
